package com.cc.persistent.controller.batis.multi;

import com.cc.persistent.mapper.m1.BookMapper;
import com.cc.persistent.mapper.m2.BookMapper2;
import com.cc.persistent.model.Book;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 新梦想.陈超
 * @version 2021.2
 * @Description: {TODO}
 * @date 2022/5/13 上午12:24
 */

@RestController
public class BookController {
    @Autowired
    BookMapper bookMapper;
    @Autowired
    BookMapper2 bookMapper2;
    @GetMapping("/test1")
    public void test1 () {
        List<Book> books1 = bookMapper.getAllBooks ();
        List<Book> books2 = bookMapper2.getAllBooks ();
        System.out.println("books1:"+books1);
        System.out.println("books2:"+books2);
    }
}